package com.dxy.hms.model.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@ColumnWidth(20) // 设置列宽，放在实体类上面是整个实体类的每个字段的列宽都为20，放在单个字段上则是改字段为20
public class RoomExcel {

    @ExcelIgnore
    private Long id;

    @ExcelProperty("房间编号")
    private String roomCode;

    @ExcelIgnore
    private Long roomType;
    @ExcelProperty("房间类型")
    private String roomTypeText;

    @ExcelIgnore
    private String roomStatus;
    @ExcelProperty("房间状态")
    private String roomStatusText;

    @ExcelProperty("价格")
    private Integer price;

    @ExcelProperty("床位数")
    private Integer bedNum;

    @ExcelProperty("创建时间")
    @DateTimeFormat("yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;
}
